## cross compile
set(CMAKE_CROSSCOMPILING ON)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_CXX_FLAGS "-fPIC -fsycl -fsycl-targets=ascend_910-cce")
if(ENABLE_FAST_HASH_TABLE)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_FAST_HASH_TABLE=1")
endif()
# bisheng kernel must be compiled with -D_GLIBCXX_USE_CXX11_ABI=1
get_property(ORIGIN_DEFS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS)
string(REPLACE "_GLIBCXX_USE_CXX11_ABI=0" "_GLIBCXX_USE_CXX11_ABI=1" NEW_DEFS ${ORIGIN_DEFS})
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS ${NEW_DEFS})

file(GLOB_RECURSE SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cc")
add_library(bisheng_kernels_impl SHARED ${SRC_LIST})
